<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象解构</title>
</head>
<body>
    <script>
        const user={
            name:'小明',
            age:18
        };
        const {name,age}=user
        console.log(name);
        console.log(age);
        
        
    </script>
</body>
</html>